package com.wxh.controller;


import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wxh.common.DataGridView;
import com.wxh.common.ResultObj;
import com.wxh.domain.Bills;
import com.wxh.service.BillsService;
import com.wxh.vo.BillsVo;


/**
 * <p>
 *  前端控制器
 * </p>
 */
@RestController
@RequestMapping("/bills")
public class BillsController {
	
	@Reference
	private BillsService billsService;
	
	

	@RequestMapping("loadAllBills")
	public DataGridView loadAllBills(BillsVo billsVo) {
		return this.billsService.queryAllBills(billsVo);
	}
	
	public ResultObj addBills(Bills bills) {
		try {
			this.billsService.addBills(bills);
			return ResultObj.ADD_SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			return ResultObj.ADD_ERROR;
		}
	}

}

